@extends('admin.layout')

@section('content')
 <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                游戏管理
                <small>列表</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 游戏管理</a></li>
                <li><a href="#">主页</a></li>
                <li class="active">列表</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">      
                        <div class="box-header">
                           
                        <div class="box-body">

                            @if(session('info'))
                            <div class="callout callout-info">
                             <p>{{session('info')}}</p>
                            </div> 
                            @endif
                                 
                                <!--分页开始-->
                            <table id="example2" class="table table-hover">

                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>游戏名称</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($data as $v)
                                <tr>
                                    <td>{{$v -> id}}</td>
                                    <td class='cname'>{{$v -> name}}</td>
                                   
                                    <td><a href="{{ url('admin/games/edit') }}/{{$v-> id}}">   编辑</a> <a href="{{ url('admin/games/delete') }}/{{$v-> id}}">删除</a>
                                    </td>
                                </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    
 
@endsection